`ifndef TRANSACTION_SVH
`define TRANSACTION_SVH

class transaction;
	bit [3:0] a;
	static int unsigned amount = 0; // transactions对象个数

	function new(input bit [3:0] a = 0);
		this.a = a;
		amount++;
	endfunction

	virtual function void print(string name = "");
		$display("%s: a=%0h", name, a);
	endfunction

	static function void print_amount();
		$display("amount=%0d", amount);
	endfunction
endclass

`endif
